<script setup lang="ts">
import { useAdminMyselfStore } from '../store/adminMyself'

import MyselfCenter from './MyselfCenter.vue'
import { storeToRefs } from 'pinia'

const store = useAdminMyselfStore()
const { saveConfig } = store
const { loading } = storeToRefs(store)
</script>

<template>
  <t-row>
    <t-card header-bordered title="个人中心" style="width: 100%">
      <template #actions>
        <t-button size="small" @click="saveConfig" :loading="loading">保存</t-button>
      </template>
      <t-row class="main">
        <MyselfCenter />
      </t-row>
    </t-card>
  </t-row>
</template>

<style scoped lang="less">
.t-row {
  margin: 20px 0;

  .main {
    border: var(--td-component-border) 1px solid;
    margin: 20px;
    box-sizing: border-box;
  }
}
</style>
